!function(o){"use strict";var e=function(){this.markers=[],this.mainMarker=!1,this.icon="http://www.google.com/mapfiles/marker.png"};e.prototype.dist=function(o){return Math.sqrt(Math.pow(this.markers[0].latitude-o.latitude,2)+Math.pow(this.markers[0].longitude-o.longitude,2))},e.prototype.setIcon=function(o){this.icon=o},e.prototype.addMarker=function(o){this.markers[this.markers.length]=o},e.prototype.getMarker=function(){if(this.mainmarker)return this.mainmarker;var o,e;return this.markers.length>1?(o=new t.MarkerImage("http://thydzik.com/thydzikGoogleMap/markerlink.php?text="+this.markers.length+"&color=EF9D3F"),e="cluster of "+this.markers.length+" markers"):(o=new t.MarkerImage(this.icon),e=this.markers[0].title),this.mainmarker=new t.Marker({position:new t.LatLng(this.markers[0].latitude,this.markers[0].longitude),icon:o,title:e,map:null}),this.mainmarker};var t=google.maps,n=new t.Geocoder,r=0,i=0,a={};a={init:function(e){var n,r=o.extend({},o.fn.gMap.defaults,e);for(n in o.fn.gMap.defaults.icon)r.icon[n]||(r.icon[n]=o.fn.gMap.defaults.icon[n]);return this.each(function(){var e,n,i=o(this),s=a._getMapCenter.apply(i,[r]);"fit"==r.zoom&&(r.zoomFit=!0,r.zoom=a._autoZoom.apply(i,[r]));var l={zoom:r.zoom,center:s,mapTypeControl:r.mapTypeControl,mapTypeControlOptions:{},zoomControl:r.zoomControl,zoomControlOptions:{},panControl:r.panControl,panControlOptions:{},scaleControl:r.scaleControl,scaleControlOptions:{},streetViewControl:r.streetViewControl,streetViewControlOptions:{},mapTypeId:r.maptype,scrollwheel:r.scrollwheel,maxZoom:r.maxZoom,minZoom:r.minZoom};r.controlsPositions.mapType&&(l.mapTypeControlOptions.position=r.controlsPositions.mapType),r.controlsPositions.zoom&&(l.zoomControlOptions.position=r.controlsPositions.zoom),r.controlsPositions.pan&&(l.panControlOptions.position=r.controlsPositions.pan),r.controlsPositions.scale&&(l.scaleControlOptions.position=r.controlsPositions.scale),r.controlsPositions.streetView&&(l.streetViewControlOptions.position=r.controlsPositions.streetView),r.styles&&(l.styles=r.styles),l.mapTypeControlOptions.style=r.controlsStyle.mapType,l.zoomControlOptions.style=r.controlsStyle.zoom,l=o.extend(l,r.extra);var c=new t.Map(this,l);if(r.log&&console.log("map center is:"),r.log&&console.log(s),i.data("$gmap",c),i.data("gmap",{opts:r,gmap:c,markers:[],markerKeys:{},infoWindow:null,clusters:[]}),0!==r.controls.length)for(e=0;et[e].latitude&&(n=t[e].latitude),rt[e].longitude&&(i=t[e].longitude),s0){for(s=null,i=0;ih.lat()&&i[o].longitudeh.lng()&&(w[w.length]=i[o]);for(l.log&&console.log("number of markers "+w.length+"/"+i.length),l.log&&console.log("cluster radius: "+k),o=0;od||s>d);n+=1)d/=2;return n-2},addMarkers:function(o){var e=this.data("gmap").opts;if(0!==o.length){e.log&&console.log("adding "+o.length+" markers");for(var t=0;t',html_append:"",icon:{image:"http://www.google.com/mapfiles/marker.png",iconsize:[20,34],iconanchor:[9,34],infowindowanchor:[0,0],shadow:"http://www.google.com/mapfiles/shadow50.png",shadowsize:[37,34],shadowanchor:[9,34]},onComplete:function(){},routeFinder:{travelMode:"BYCAR",travelUnit:"KM",routeDisplay:null,routeErrors:{INVALID_REQUEST:"The provided request is invalid.",NOT_FOUND:"One or more of the given addresses could not be found.",OVER_QUERY_LIMIT:"A temporary error occured. Please try again in a few minutes.",REQUEST_DENIED:"An error occured. Please contact us.",UNKNOWN_ERROR:"An unknown error occured. Please try again.",ZERO_RESULTS:"No route could be found within the given addresses."}},clustering:{enabled:!1,fastClustering:!1,clusterCount:10,clusterSize:40},extra:{}}}(jQuery);